﻿using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

namespace DHJ.Cost.Migrations
{
    public partial class add_report : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "ChReports",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                    CreationTime = table.Column<DateTime>(nullable: false),
                    CreatorUserId = table.Column<long>(nullable: true),
                    LastModificationTime = table.Column<DateTime>(nullable: true),
                    LastModifierUserId = table.Column<long>(nullable: true),
                    IsDeleted = table.Column<bool>(nullable: false),
                    DeleterUserId = table.Column<long>(nullable: true),
                    DeletionTime = table.Column<DateTime>(nullable: true),
                    ZhuCaiCost = table.Column<decimal>(nullable: false),
                    FuCaiCost = table.Column<decimal>(nullable: false),
                    BiaoZhunJianCost = table.Column<decimal>(nullable: false),
                    WaiXieCost = table.Column<decimal>(nullable: false),
                    GongZhuangCost = table.Column<decimal>(nullable: false),
                    RenGongCost = table.Column<decimal>(nullable: false),
                    RanDongCost = table.Column<decimal>(nullable: false),
                    ZhiZaoCost = table.Column<decimal>(nullable: false),
                    QiTaCost = table.Column<decimal>(nullable: false),
                    Year = table.Column<int>(nullable: false),
                    Month = table.Column<int>(nullable: false),
                    ModelCode = table.Column<string>(nullable: true),
                    Type = table.Column<int>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ChReports", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "SzReports",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                    CreationTime = table.Column<DateTime>(nullable: false),
                    CreatorUserId = table.Column<long>(nullable: true),
                    LastModificationTime = table.Column<DateTime>(nullable: true),
                    LastModifierUserId = table.Column<long>(nullable: true),
                    IsDeleted = table.Column<bool>(nullable: false),
                    DeleterUserId = table.Column<long>(nullable: true),
                    DeletionTime = table.Column<DateTime>(nullable: true),
                    TemporaryPrice = table.Column<decimal>(nullable: false),
                    ContractPrice = table.Column<decimal>(nullable: false),
                    TotalReceipts = table.Column<decimal>(nullable: false),
                    TotalSettlement = table.Column<decimal>(nullable: false),
                    ActualCost = table.Column<decimal>(nullable: false),
                    SettledCost = table.Column<decimal>(nullable: false),
                    OutsourcePayment = table.Column<decimal>(nullable: false),
                    MaterialsPayment = table.Column<decimal>(nullable: false),
                    TotalPayment = table.Column<decimal>(nullable: false),
                    ManagementCost = table.Column<decimal>(nullable: false),
                    TotalCost = table.Column<decimal>(nullable: false),
                    CurrentMonthCost = table.Column<decimal>(nullable: false),
                    Year = table.Column<int>(nullable: false),
                    Month = table.Column<int>(nullable: false),
                    ModelCode = table.Column<string>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SzReports", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "ChReports");

            migrationBuilder.DropTable(
                name: "SzReports");
        }
    }
}
